package Summative;

import java.awt.event.*;
import javax.swing.*;

public class TextListener implements ActionListener
{
  JTextField field;
  String input;
  VectorList vectors;
  
  public TextListener(JTextField field, VectorList vectors)
  {
    this.field = field;
    this.vectors = vectors;
  }
  
  public void actionPerformed(ActionEvent e)
  {
    this.input = field.getText();
    vectors.addVector(input);
  }
}